package ru.paswd.marketprice.distance.calculator.compare;

import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackages = {"ru.paswd.marketprice.distance.calculator.compare"})
@RequiredArgsConstructor
public class DistanceCalculatorCompareApplication {

    private final DistanceCalculatorComparator comparator;

    public static void main(String[] args) {
        SpringApplication.run(DistanceCalculatorCompareApplication.class, args);
    }

    @Bean
    public CommandLineRunner runComparator() {
        return args -> comparator.compare();
    }
}
